<script lang="ts" setup>
  import { getTestData } from '@/api/login';

  import { useSelectOption } from '@/hooks/arco/useSelectOption';
  import { ref } from 'vue';

  const deptSelect = useSelectOption({
    name: '上级部门',
    apiFun: getTestData,
    fieldNames: {
      value: 'deptId',
      label: 'name',
    },
  });

  const deptId = ref('');
</script>

<template>
  <div>
    <a-select
      v-model="deptId"
      class="w-full"
      allow-clear
      v-bind="deptSelect.bindProps"
    />
  </div>
</template>

<style></style>
